package com.yunxin.core.infra.persistence.mapper.merchant;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.yunxin.core.infra.persistence.entity.merchant.MerchantInvoiceInfoDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author zero°
 * @since 2023-05-25
 */
@DS("core")
@Mapper
public interface MerchantInvoiceInfoExtendMapper extends MerchantInvoiceInfoMapper {

    /**
     * 根据商户code逻辑删除商户发票信息
     * @param editor editor
     * @param merchantId merchantId
     * @return int
     */
    int updateMerchantInvoiceInfoDelPersonByMerchantId(@Param("editor") String editor,
                                                       @Param("merchantId") Long merchantId);

    /**
     * 根据商户code查询未删除的商户发票信息（id中最大)
     * @param merchantId merchantId
     * @return MerchantContactPerson
     */
    MerchantInvoiceInfoDO selectMerchantInvoiceInfoByMerchantId(@Param("merchantId") Long merchantId);
}
